package com.base.andlang2.ui

import androidx.lifecycle.ViewModelProvider
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.base.andlang2.databinding.ActivitySecondBinding
import com.base.andlangcore.mvvm.AndLangActivity
import com.base.andlangcore.mvvm.AndLangModel
import com.base.andlangrouter.RouteUrl

@Route(path = RouteUrl.APP_SECOND_ACTIVITY)
class SecondActivity : AndLangActivity<ActivitySecondBinding,AndLangModel>() {

    @JvmField
    @Autowired
    var key:String=""

    override fun getViewBinding(): ActivitySecondBinding {
        return ActivitySecondBinding.inflate(layoutInflater)
    }

    override fun getVM(): AndLangModel {
        return ViewModelProvider(this)[AndLangModel::class.java]
    }

    override fun initView() {
        ARouter.getInstance().inject(this)
        vb?.apply {
            textSecond.text=key
        }
    }

    override fun initData() {

    }
}